package com.hongning.railway.entity.resbean;

import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;

import java.util.List;

public class ResDynamicBean {


    /**
     * data : [{"appCoverImg":"","appIsTop":"N","authStatus":"04","authTime":1565599376000,"clickNum":0,"createTime":1565512689000,"deploySys":"12","ext1":"0","hasCover":"1","newsBelong":"1","newsCategory":"1","newsId":"20190811163809158490","newsOrgionTime":"2019-08-11 16:38:09","newsRoundup":"4月4日上午，为了维护企业形象，增强爱企责任意识，强化党员规矩意识纪律意识，机务段党支部组织召开车间党小组党员专题党会。","newsSubTypeId":"102001","newsTitle":"【支部行动】守规矩 讲纪律 ---机务段党支部增强一线党员纪律意识","newsTypeId":"102001","newsWeight":0,"orgId":"101001","orgName":"机关第一党支部工作组","pcCoverImg":"","pcIsTop":"N","showTime":0,"staffId":"123","staffName":""},{"appCoverImg":"http://47.108.73.33:8999/nbfp/templates/img/2019/8/12/20190812142005160904_about.jpg","appIsTop":"N","authStatus":"04","clickNum":0,"createTime":1565422242000,"deploySys":"12","ext1":"0","ext3":"1","hasCover":"1","newsBelong":"1","newsCategory":"1","newsId":"20190810153041169037","newsOrgionTime":"2019-08-10 15:30:41","newsRoundup":"1","newsSubTypeId":"101001","newsTitle":"阿斯顿fads22222","newsTypeId":"101001","newsWeight":0,"orgId":"101001","pcCoverImg":"http://47.108.73.33:8999/nbfp/templates/img/2019/8/12/20190812142005160904_about.jpg","pcIsTop":"N","showTime":0,"staffId":"123","staffName":"111"}]
     * pageNum : 1
     * totle : 2
     */

    private int pageNum;
    private int totle;
    private List<DataBean> data;

    /**
     * 后台sx说的根据图片显示 做好撕逼准备
     * @return
     */


    public int getPageNum() {
        return pageNum;
    }

    public void setPageNum(int pageNum) {
        this.pageNum = pageNum;
    }

    public int getTotle() {
        return totle;
    }

    public void setTotle(int totle) {
        this.totle = totle;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements Parcelable {
        /**
         * appCoverImg :
         * appIsTop : N
         * authStatus : 04
         * authTime : 1565599376000
         * clickNum : 0
         * createTime : 1565512689000
         * deploySys : 12
         * ext1 : 0
         * hasCover : 1
         * newsBelong : 1
         * newsCategory : 1
         * newsId : 20190811163809158490
         * newsOrgionTime : 2019-08-11 16:38:09
         * newsRoundup : 4月4日上午，为了维护企业形象，增强爱企责任意识，强化党员规矩意识纪律意识，机务段党支部组织召开车间党小组党员专题党会。
         * newsSubTypeId : 102001
         * newsTitle : 【支部行动】守规矩 讲纪律 ---机务段党支部增强一线党员纪律意识
         * newsTypeId : 102001
         * newsWeight : 0
         * orgId : 101001
         * orgName : 机关第一党支部工作组
         * pcCoverImg :
         * pcIsTop : N
         * showTime : 0
         * staffId : 123
         * staffName :
         * ext3 : 1
         */

        private String appCoverImg;
        private String appIsTop;
        private String authStatus;
        private long authTime;
        private String clickNum;
        private long createTime;
        private String deploySys;
        private String ext1;
        private String hasCover;
        private String newsBelong;
        private String newsCategory;
        private String newsId;
        private String newsOrgionTime;
        private String newsRoundup;
        private String newsSubTypeId;
        private String newsTitle;
        private String newsTypeId;
        private int newsWeight;
        private String orgId;
        private String orgName;
        private String pcCoverImg;
        private String pcIsTop;
        private int showTime;
        private String staffId;
        private String staffName;
        private String ext3;
        private String ext2;

        public String getExt2() {
            return ext2;
        }

        public void setExt2(String ext2) {
            this.ext2 = ext2;
        }

        public static Creator<DataBean> getCREATOR() {
            return CREATOR;
        }

        public int getType(){
            if ("102001" .equals(newsTypeId) ){
                return 2;
            }else {
                return 1;
            }
        }
        public String getAppCoverImg() {
            return appCoverImg;
        }

        public void setAppCoverImg(String appCoverImg) {
            this.appCoverImg = appCoverImg;
        }

        public String getAppIsTop() {
            return appIsTop;
        }

        public void setAppIsTop(String appIsTop) {
            this.appIsTop = appIsTop;
        }

        public String getAuthStatus() {
            return authStatus;
        }

        public void setAuthStatus(String authStatus) {
            this.authStatus = authStatus;
        }

        public long getAuthTime() {
            return authTime;
        }

        public void setAuthTime(long authTime) {
            this.authTime = authTime;
        }

        public String getClickNum() {
            return clickNum;
        }

        public void setClickNum(String clickNum) {
            this.clickNum = clickNum;
        }

        public long getCreateTime() {
            return createTime;
        }

        public void setCreateTime(long createTime) {
            this.createTime = createTime;
        }

        public String getDeploySys() {
            return deploySys;
        }

        public void setDeploySys(String deploySys) {
            this.deploySys = deploySys;
        }

        public String getExt1() {
            return ext1;
        }

        public void setExt1(String ext1) {
            this.ext1 = ext1;
        }

        public String getHasCover() {
            return hasCover;
        }

        public void setHasCover(String hasCover) {
            this.hasCover = hasCover;
        }

        public String getNewsBelong() {
            return newsBelong;
        }

        public void setNewsBelong(String newsBelong) {
            this.newsBelong = newsBelong;
        }

        public String getNewsCategory() {
            return newsCategory;
        }

        public void setNewsCategory(String newsCategory) {
            this.newsCategory = newsCategory;
        }

        public String getNewsId() {
            return newsId;
        }

        public void setNewsId(String newsId) {
            this.newsId = newsId;
        }

        public String getNewsOrgionTime() {
            return newsOrgionTime;
        }

        public void setNewsOrgionTime(String newsOrgionTime) {
            this.newsOrgionTime = newsOrgionTime;
        }

        public String getNewsRoundup() {
            return newsRoundup;
        }

        public void setNewsRoundup(String newsRoundup) {
            this.newsRoundup = newsRoundup;
        }

        public String getNewsSubTypeId() {
            return newsSubTypeId;
        }

        public void setNewsSubTypeId(String newsSubTypeId) {
            this.newsSubTypeId = newsSubTypeId;
        }

        public String getNewsTitle() {
            return newsTitle;
        }

        public void setNewsTitle(String newsTitle) {
            this.newsTitle = newsTitle;
        }

        public String getNewsTypeId() {
            return newsTypeId;
        }

        public void setNewsTypeId(String newsTypeId) {
            this.newsTypeId = newsTypeId;
        }

        public int getNewsWeight() {
            return newsWeight;
        }

        public void setNewsWeight(int newsWeight) {
            this.newsWeight = newsWeight;
        }

        public String getOrgId() {
            return orgId;
        }

        public void setOrgId(String orgId) {
            this.orgId = orgId;
        }

        public String getOrgName() {
            if (TextUtils.isEmpty(orgName)){
                return "后台未返回";
            }
            return orgName;
        }

        public void setOrgName(String orgName) {
            this.orgName = orgName;
        }

        public String getPcCoverImg() {
            return pcCoverImg;
        }

        public void setPcCoverImg(String pcCoverImg) {
            this.pcCoverImg = pcCoverImg;
        }

        public String getPcIsTop() {
            return pcIsTop;
        }

        public void setPcIsTop(String pcIsTop) {
            this.pcIsTop = pcIsTop;
        }

        public int getShowTime() {
            return showTime;
        }

        public void setShowTime(int showTime) {
            this.showTime = showTime;
        }

        public String getStaffId() {
            return staffId;
        }

        public void setStaffId(String staffId) {
            this.staffId = staffId;
        }

        public String getStaffName() {
            return staffName;
        }

        public void setStaffName(String staffName) {
            this.staffName = staffName;
        }

        public String getExt3() {
            return ext3;
        }

        public void setExt3(String ext3) {
            this.ext3 = ext3;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.appCoverImg);
            dest.writeString(this.appIsTop);
            dest.writeString(this.authStatus);
            dest.writeLong(this.authTime);
            dest.writeString(this.clickNum);
            dest.writeLong(this.createTime);
            dest.writeString(this.deploySys);
            dest.writeString(this.ext1);
            dest.writeString(this.hasCover);
            dest.writeString(this.newsBelong);
            dest.writeString(this.newsCategory);
            dest.writeString(this.newsId);
            dest.writeString(this.newsOrgionTime);
            dest.writeString(this.newsRoundup);
            dest.writeString(this.newsSubTypeId);
            dest.writeString(this.newsTitle);
            dest.writeString(this.newsTypeId);
            dest.writeInt(this.newsWeight);
            dest.writeString(this.orgId);
            dest.writeString(this.orgName);
            dest.writeString(this.pcCoverImg);
            dest.writeString(this.pcIsTop);
            dest.writeInt(this.showTime);
            dest.writeString(this.staffId);
            dest.writeString(this.staffName);
            dest.writeString(this.ext3);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.appCoverImg = in.readString();
            this.appIsTop = in.readString();
            this.authStatus = in.readString();
            this.authTime = in.readLong();
            this.clickNum = in.readString();
            this.createTime = in.readLong();
            this.deploySys = in.readString();
            this.ext1 = in.readString();
            this.hasCover = in.readString();
            this.newsBelong = in.readString();
            this.newsCategory = in.readString();
            this.newsId = in.readString();
            this.newsOrgionTime = in.readString();
            this.newsRoundup = in.readString();
            this.newsSubTypeId = in.readString();
            this.newsTitle = in.readString();
            this.newsTypeId = in.readString();
            this.newsWeight = in.readInt();
            this.orgId = in.readString();
            this.orgName = in.readString();
            this.pcCoverImg = in.readString();
            this.pcIsTop = in.readString();
            this.showTime = in.readInt();
            this.staffId = in.readString();
            this.staffName = in.readString();
            this.ext3 = in.readString();
        }

        public static final Parcelable.Creator<DataBean> CREATOR = new Parcelable.Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }
}
